package org.dromara.profiles.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 捐赠者附件表
 * 数据库表名：bus_donor_attachment
 */
@Data
@TableName("bus_donor_attachment")
public class BusDonorAttachment implements Serializable {

    @TableField("id")
    @NotNull(message = "id不能为空")
    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long id;

    @TableField("donor_id")
    @NotNull(message = "捐赠者ID不能为空")
    @Schema(description = "捐赠者ID", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long donor_id;

    @TableField("file_type")
    @NotNull(message = "文件类型不能为空")
    @Schema(description = "文件类型: 1-图片, 2-视频, 3-PDF, 4-文档", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer file_type;

    @TableField("file_name")
    @NotBlank(message = "文件名称不能为空")
    @Size(max = 255, message = "文件名称长度不能超过255")
    @Length(max = 255, message = "文件名称长度不能超过255")
    @Schema(description = "文件名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String file_name;

    @TableField("file_path")
    @NotBlank(message = "文件存储路径不能为空")
    @Size(max = 500, message = "文件存储路径长度不能超过500")
    @Length(max = 500, message = "文件存储路径长度不能超过500")
    @Schema(description = "文件存储路径", requiredMode = Schema.RequiredMode.REQUIRED)
    private String file_path;

    @TableField("upload_time")
    @Schema(description = "上传时间")
    private LocalDateTime upload_time;

    @TableField("del_flag")
    @Schema(description = "删除标志: 0-存在, 1-删除")
    private Integer del_flag;
}
